<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<include file="./Home/Tpl/Admin/Common/cssjs.html" />
</head>
<body>
<style type="text/css">
	html{_overflow-y:scroll}
</style>
<div class="subnav">
  <div class="content-menu ib-a blue line-x"> 
  <a href="javascript:;" class="on"><em>模板编辑</em></a> <span>|</span><a href="{:U("Template/Style/add",array("dir"=>urlencode($dir) ))}" ><em>在此目录下添加模板</em></a> 
  </div>
</div>
<div class="pad-lr-10">
  <div class="table-list">
    <form action="{:U("Style/updatefilename")}" method="post">
      <table width="100%" cellspacing="0">
        <thead>
          <tr>
            <th align="left" >目录列表</th>
            <th align="left" >说明</th>
            <th align="left" >操作</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="3">当前目录：{$local}</td>
          </tr>
          <if condition="$dir neq '' && $dir neq '.' "> 
          <tr>
            <td align="left" colspan="3"><a href="{:U("Template/Style/index",array("dir"=>urlencode(stripslashes(dirname($dir))) ))}"><img src="{$Config.siteurl}statics/images/folder-closed.gif" />上一层目录</a></td>
          </tr>
          </if>
          <volist name="tplist" id="vo">
          <tr>
            <td align="left">
            <if condition="substr(basename($vo),-5,5) == '.html'"> 
            <img src="{$Config.siteurl}statics/images/file.gif" />
            <a href="{:U("Template/Style/edit_file",array("dir"=>urlencode(stripslashes($dir)) ,"file"=>basename($vo)))}"><b>{$vo|basename}</b></a></td>
            <td align="left"><input type="text" name="file_explan[{$encode_local}][{$vo|basename}]" value="<?=(isset($file_explan[$encode_local][basename($vo)]) ? $file_explan[$encode_local][basename($vo)] : "")?>"></td>
            <td> <a href="{:U("Template/Style/edit_file",array("dir"=>urlencode($dir) ,"file"=>basename($vo)))}">[修改]</a> | <a href="javascript:confirmurl('{:U("Template/Style/delete",array("dir"=>urlencode($dir) ,"file"=>basename($vo)))}','确认要删除吗？')">[删除]</a></td>
            <else />
            <img src="{$Config.siteurl}statics/images/folder-closed.gif" />
            <a href="{:U("Template/Style/index",array("dir"=>(isset($_GET['dir']) && !empty($_GET['dir']) ? stripslashes($_GET['dir']).DIRECTORY_SEPARATOR : '').basename($vo) ))}"><b>{$vo|basename}</b></a></td>
            <td align="left"><input type="text" name="file_explan[{$encode_local}][{$vo|basename}]" value="<?=(isset($file_explan[$encode_local][basename($vo)]) ? $file_explan[$encode_local][basename($vo)] : "")?>"></td>
            <td></td>
            </if>
          </tr>
          </volist>
        </tbody>
      </table>
      <div class="btn">
        <input type="button" class="button" name="dosubmit" value="新建" onclick="add_file()" />
        <input type="submit" class="button" name="dosubmit" value="更新" >
      </div>
    </form>
  </div>
  <div id="pages"></div>
</div>
</body>
</html>